#include "drv_led.h"
#include "drv_beep.h"
#include "FreeRTOS.h"
#include "task.h"

TaskHandle_t LEDHanle;
TaskHandle_t BeepHanle;

void vTaskLED(void * pvParameters)
{
	for(;;)
	{
		drv_led_open(GPIO_Pin_8);
		vTaskDelay(1000);
		drv_led_close(GPIO_Pin_8);
		vTaskDelay(1000);
//		vTaskDelete(LEDHanle);
	}
}

void vTaskBeep(void * pvParameters)
{
	for(;;)
	{
		drv_beep_open();
		vTaskDelay(500);
		drv_beep_close();
		vTaskDelay(500);
	}
}
int main(){
	drv_led_init(GPIO_Pin_8);
	drv_beep_init();
	xTaskCreate(vTaskLED,"vTaskLED",128,NULL,1,&LEDHanle);
//	xTaskCreate(vTaskBeep,"vTaskBeep",128,NULL,2,&BeepHanle);
	vTaskStartScheduler();
	
	while(1)
	{

	}
}



